<template>
	<up-popup :show="interviewVisible" mode="center" bgColor="transparent" @close="interviewVisible = false">
		<view class="r-20 p-h20 flex-d-c interview">
			<view class="flex-c h-102">
				<text class="text-700-132">面试邀请</text>
			</view>
			<view class="flex-1 w bg-1 r-10 overflow-hidden">
				<scroll-view scroll-y="true" class="h">
					<view class="p-a20 flex-d-lc">
						<view class="p-t20 p-b40 w flex-d-c">
							<image class="m-b10 square-150 r-10" :src="info.images" mode="aspectFill" />
							<text class="text-700-130">{{ info.title }}</text>
						</view>
						<text class="text-400-328">嗨！{{ userInfo.nickname }} {{ userInfo.gender ? '先生' : '女士' }}：</text>
						<text class="m-t20 text-400-328">恭喜你投递的【{{ info.title }}】岗位已通过简历筛选，现邀请你参见面试</text>
						<text class="m-t20 text-400-328">时间：{{ info.dates }} {{ info.times }}</text>
						<text class="m-t20 text-400-328">联系电话：{{ info.mobile }}</text>
						<text class="m-t20 text-400-328">地址：{{ info.address }}</text>
					</view>
				</scroll-view>
			</view>
			<view class="flex-c w h-102" @click="goto" data-url="/pages_site/pages/notice/notice">
				<text class="text-400-528">《查看面试须知》</text>
			</view>
		</view>
		<view class="flex-c m-t48">
			<up-icon name="close-circle" color="#fff" size="36" @click="interviewVisible = false"></up-icon>
		</view>
	</up-popup>
</template>

<script lang="ts" setup>
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { useNavigator } from '@/hooks/use-navigator'
import { useUserStore } from '@/stores/user'
const { userInfo } = useUserStore()
const { goto } = useNavigator()
const interviewVisible = ref<boolean>(false)
const info = ref({})
//获取面试通知列表
async function getList() {
	const res = await uni.$u.get('/msg/info')
	if (res.data) {
		interviewVisible.value = true
		info.value = res.data
	}

}
onLoad(() => {
	getList()
})
</script>

<style lang="scss" scoped>
.interview {
	width: 670rpx;
	height: 834rpx;
	background-color: #E2EDFF;
}
</style>